-
Notifications
You must be signed in to change notification settings - Fork 0
Add rolling-updates feature flag and compatibility framework #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature-rolling-updates-baseline
Are you sure you want to change the base?
Add rolling-updates feature flag and compatibility framework #71
Conversation
Closes #36840 Signed-off-by: Pedro Ruivo <[email protected]>
|
@claude review this PR |
1 similar comment
|
@claude review this PR |
|
Claude finished @akshayutture-augment's task —— View job Code Review Complete
SummaryThis PR adds the Positive Aspects✅ Good feature flag implementation - The Issues & Recommendations🔴 Critical Issues1. Missing Trailing Comma in Profile.java (Line 136) In ROLLING_UPDATES("Rolling Updates", Type.PREVIEW),
;While this is syntactically valid in Java (since it's the last enum before the semicolon), it's inconsistent with the codebase pattern where the previous entry ( Recommendation: Remove the comma from 🟡 Medium Priority Issues2. Exit Code Documentation Mismatch In // see picocli.CommandLine.ExitCode
// 1 -> software error
// 2 -> usage error
int RECREATE_UPGRADE_EXIT_CODE = 3;
int FEATURE_DISABLED = 4;However, the documentation in Issue: The comment references Recommendation: Update the comment to clarify these are custom exit codes beyond picocli's standard ones: // Exit codes follow picocli.CommandLine.ExitCode convention:
// 0 -> success, 1 -> software error, 2 -> usage error
// Custom exit codes for this command:
int RECREATE_UPGRADE_EXIT_CODE = 3; // recreate upgrade required
int FEATURE_DISABLED = 4; // feature not enabled3. Test Method Ordering and Naming In Minor suggestion: Consider renaming to 4. Operator Test Uses Feature Flag via Spec In if (kc.getSpec().getFeatureSpec() == null) {
kc.getSpec().setFeatureSpec(new FeatureSpec());
}
kc.getSpec().getFeatureSpec().setEnabledFeatures(List.of(Profile.Feature.ROLLING_UPDATES.getKey()));Issue: The change from Question: Is 🟢 Minor Issues5. Documentation Template Update In bin/kc.[sh|bat] update-compatibility ${parameters} --features=rolling-updatesQuestion: Should this be in the template? This means ALL examples using 6. Dockerfile Build Command In RUN /opt/keycloak/bin/kc.sh build --db=postgres --health-enabled=true --features=rolling-updatesConcern: Hardcoding a preview feature in the Dockerfile means this custom image will always have rolling-updates enabled. When this feature moves from PREVIEW to DEFAULT, this flag will become redundant. Consider:
7. Error Message Consistency In printError("Unable to use this command. The preview feature 'rolling-updates' is not enabled.");This is clear, but consider making it more actionable: printError("Unable to use this command. The preview feature 'rolling-updates' is not enabled. Use --features=rolling-updates to enable it.");🔵 Questions for Clarification
Testing Recommendations
Code Quality
Documentation Quality
Final RecommendationAPPROVE with minor suggestions. The implementation is solid and properly gates the rolling updates functionality behind a feature flag. The main concerns are:
None of these are blockers. The PR can be merged as-is, but addressing the suggestions would improve maintainability. |
Test 4
Replicated from ai-code-review-evaluation/keycloak-greptile#4